import { h } from 'vue';

export const columns = [
  {
    type: 'selection',
    key: 'selection',
  },
  {
    title: '名称',
    key: 'desc',
  },
  {
    title: '支付方式',
    key: 'method',
    width: 80,
    render(row) {
      return h(
        'span',
        { style: row.method == 'wechat' ? 'color:green' : 'color:blue' },
        {
          default: () => (row.method == 'wechat' ? '微信' : row.method == 'alipay' ? '支付宝' : ''),
        }
      );
    },
  },
  {
    title: '状态',
    key: 'status',
    width: 100,
    render(row) {
      return h(
        'span',
        { style: row.status == 1 ? 'color:green' : 'color:red' },
        {
          default: () => (row.status == 1 ? '已开启' :  '已关闭'),
        }
      );
    },
  },
  {
    title: '类型',
    key: 'type',
    width: 100,
    render(row) {
      return h(
        'span',
        { style: row.type == "Trans" ? 'color:red' : 'color:green'},
        {
          default: () => (row.type == "Trans"? '打款提现' :  row.type),
        }
      );
    },
  },
  {
    title: 'alipayCertPublicKeyPath',
    key: 'aliKAlipayCertPublicKeyPath',
  },
  {
    title: 'appCertPublicKeyPath',
    key: 'aliKAppCertPublicKeyPath',
  },
  {
    title: 'appId',
    key: 'aliKAppId',
  },
  {
    title: 'aliPrivateKey',
    key: 'aliKPrivateKey',
  },
  {
    title: 'aliRootCertPublicKeyPath',
    key: 'aliKRootCertPublicKeyPath',
  },
  {
    title: '回调地址',
    key: 'notifyUrl',
  },
];
